<!-- 元素可见设置 -->
<template>
    <el-collapse modelValue="1">
        <el-collapse-item title="元素可见设置" name="1">
            <layout-pane label="查看权限">
                <user-role-setting
                    v-model:role="widget.widgetData.eles.customFeature.userViewRole"
                    v-model:roleData="widget.widgetData.eles.customFeature.userViewRoleData"
                />
            </layout-pane>
        </el-collapse-item>
    </el-collapse>
</template>

<script>
import { defineComponent, toRefs, computed } from 'vue'
import UserRoleSetting from '@/components/edit/user-role-setting'
import LayoutPane from '@/components/setting-pane/layout-pane'
export default defineComponent({
    name: 'RowElementVisible',
    components: {
        LayoutPane,
        UserRoleSetting
    },
    props: {
        widget: {
            type: Object,
            default: () => ({})
        }
    },
    setup(props) {
        const { widget } = toRefs(props)
        const widgetType = computed(() => widget.value?.widgetData?.eles?.type)

        return {
            widget,
            widgetType
        }
    }
})
</script>